package com.prathiba;

public enum Product {

	TABLE(100.00), CHAIR(25.00), PICTURE(15.00), LAMP(25.00), PLANTS(5.00), CLOCK(
			18.00);

	private double price;

	private Product(double price) {
		this.price = price;
	}

	public double getPrice() {
		return price;
	}

	public static boolean exists(String productName) {
		Product check;
		try {
			check = Product.valueOf(productName);

		} catch (IllegalArgumentException ex) {
			return false;
		}
		return true;
	}
}
